
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for act_action_config
-- ----------------------------
DROP TABLE IF EXISTS `act_action_config`;
CREATE TABLE `act_action_config` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '唯一编码 : 唯一编码',
  `action_code` varchar(128) NOT NULL COMMENT '动作编码 : 动作编码',
  `action_type` int(2) NOT NULL DEFAULT '2' COMMENT '动作类型 : 动作类型 1数据上传类 2数据验证类 3硬件控制类 4LED显示类 5数值验证类',
  `monitor_class` varchar(128) DEFAULT NULL COMMENT '监听类',
  `monitor_method` varchar(128) DEFAULT NULL COMMENT '监听方法 : 监听方法',
  `is_send_client` int(1) DEFAULT '0' COMMENT '是否发送至客户端 : 是否发送至客户端 0不发送 1发送',
  `action_name` varchar(128) DEFAULT NULL COMMENT '动作名称',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='流程动作配置';

-- ----------------------------
-- Records of act_action_config
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for act_action_record
-- ----------------------------
DROP TABLE IF EXISTS `act_action_record`;
CREATE TABLE `act_action_record` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '唯一编码 : 唯一编码',
  `action_code` varchar(128) DEFAULT NULL COMMENT '动作代码 : 动作代码',
  `action_name` varchar(128) DEFAULT NULL COMMENT '动作名称 : 动作名称',
  `start_time` datetime DEFAULT NULL COMMENT '执行开始时间 : 执行开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '执行结束时间 : 执行结束时间',
  `execution_time` int(12) DEFAULT NULL COMMENT '执行时间 : 执行时间',
  `node_code` varchar(128) DEFAULT NULL COMMENT '节点编码 : 节点编码',
  `flow_code` varchar(128) DEFAULT NULL COMMENT '流程编码 : 流程编码',
  `is_execution_success` int(1) DEFAULT NULL COMMENT '是否执行成功 :  0表示执行成功 1表示失败',
  `results_msg` varchar(128) DEFAULT NULL COMMENT '执行结果 : 执行结果',
  `instance_record_id` int(9) DEFAULT NULL COMMENT '业务实例记录id : 业务实例记录id',
  `node_record_id` int(9) DEFAULT NULL COMMENT '流程节点记录id : 流程节点记录id',
  `result_code` varchar(32) DEFAULT NULL COMMENT '返回代码 : 返回代码',
  `remarks` varchar(128) DEFAULT NULL COMMENT '备注 : 备注',
  `business_id` varchar(128) DEFAULT NULL COMMENT '业务id : 业务id',
  `business_name` varchar(128) DEFAULT NULL COMMENT '业务名称 : 业务名称',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='动作记录';

-- ----------------------------
-- Records of act_action_record
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for act_evt_log
-- ----------------------------
DROP TABLE IF EXISTS `act_evt_log`;
CREATE TABLE `act_evt_log` (
  `LOG_NR_` bigint(20) NOT NULL AUTO_INCREMENT,
  `TYPE_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TIME_STAMP_` timestamp(3) NOT NULL,
  `USER_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `DATA_` longblob,
  `LOCK_OWNER_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `LOCK_TIME_` timestamp(3) NULL DEFAULT NULL,
  `IS_PROCESSED_` tinyint(4) DEFAULT '0',
  PRIMARY KEY (`LOG_NR_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of act_evt_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for act_flow_config
-- ----------------------------
DROP TABLE IF EXISTS `act_flow_config`;
CREATE TABLE `act_flow_config` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '唯一编码 : 唯一编码',
  `flow_name` varchar(128) DEFAULT NULL COMMENT '流程名称 : 业务名称',
  `flow_code` varchar(128) DEFAULT NULL COMMENT '流程code : 业务code',
  `model_code` varchar(128) DEFAULT NULL COMMENT '模型编码 : 模型编码',
  `version` varchar(30) DEFAULT NULL COMMENT '版本号 : 版本号',
  `is_enable` int(1) DEFAULT '1' COMMENT '是否启用 : 0不启用 1启用',
  `deploy_code` varchar(128) DEFAULT NULL COMMENT '部署编码',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='流程模型配置表';

-- ----------------------------
-- Records of act_flow_config
-- ----------------------------
BEGIN;
INSERT INTO `act_flow_config` VALUES (1, '开户流程', 'OPEN_ACCOUNT_FLOW', '2501', '1', 1, NULL);
INSERT INTO `act_flow_config` VALUES (4, '兑付单流程', 'CASH_ORDER_FLOW', '5002', '1', 1, NULL);
INSERT INTO `act_flow_config` VALUES (7, 'ac74f1f0-4c9e-4e6c-88c4-a66ab110f463', NULL, '139428', '1', 1, NULL);
INSERT INTO `act_flow_config` VALUES (8, 'ac74f1f0-4c9e-4e6c-88c4-a66ab110f463', NULL, '139428', '1', 1, NULL);
INSERT INTO `act_flow_config` VALUES (9, 'ac74f1f0-4c9e-4e6c-88c4-a66ab110f463', NULL, '139428', '1', 1, NULL);
INSERT INTO `act_flow_config` VALUES (10, 'ac74f1f0-4c9e-4e6c-88c4-a66ab110f463', NULL, '139428', '1', 1, NULL);
INSERT INTO `act_flow_config` VALUES (11, 'ac74f1f0-4c9e-4e6c-88c4-a66ab110f463', NULL, '139428', '1', 1, NULL);
COMMIT;

-- ----------------------------
-- Table structure for act_flow_node
-- ----------------------------
DROP TABLE IF EXISTS `act_flow_node`;
CREATE TABLE `act_flow_node` (
  `flow_code` varchar(128) NOT NULL COMMENT '流程编码',
  `node_code` varchar(128) NOT NULL COMMENT '节点编码',
  PRIMARY KEY (`flow_code`,`node_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='流程节点对照表';

-- ----------------------------
-- Records of act_flow_node
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for act_ge_bytearray
-- ----------------------------
DROP TABLE IF EXISTS `act_ge_bytearray`;
CREATE TABLE `act_ge_bytearray` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `BYTES_` longblob,
  `GENERATED_` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_FK_BYTEARR_DEPL` (`DEPLOYMENT_ID_`),
  CONSTRAINT `ACT_FK_BYTEARR_DEPL` FOREIGN KEY (`DEPLOYMENT_ID_`) REFERENCES `act_re_deployment` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for act_ge_property
-- ----------------------------
DROP TABLE IF EXISTS `act_ge_property`;
CREATE TABLE `act_ge_property` (
  `NAME_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `VALUE_` varchar(300) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `REV_` int(11) DEFAULT NULL,
  PRIMARY KEY (`NAME_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of act_ge_property
-- ----------------------------
BEGIN;
INSERT INTO `act_ge_property` VALUES ('next.dbid', '160001', 65);
INSERT INTO `act_ge_property` VALUES ('schema.history', 'create(5.22.0.0)', 1);
INSERT INTO `act_ge_property` VALUES ('schema.version', '5.22.0.0', 1);
COMMIT;

-- ----------------------------
-- Table structure for act_hi_actinst
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_actinst`;
CREATE TABLE `act_hi_actinst` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `ACT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `CALL_PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `ACT_NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `ACT_TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `ASSIGNEE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `START_TIME_` datetime(3) NOT NULL,
  `END_TIME_` datetime(3) DEFAULT NULL,
  `DURATION_` bigint(20) DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_HI_ACT_INST_START` (`START_TIME_`),
  KEY `ACT_IDX_HI_ACT_INST_END` (`END_TIME_`),
  KEY `ACT_IDX_HI_ACT_INST_PROCINST` (`PROC_INST_ID_`,`ACT_ID_`),
  KEY `ACT_IDX_HI_ACT_INST_EXEC` (`EXECUTION_ID_`,`ACT_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for act_hi_attachment
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_attachment`;
CREATE TABLE `act_hi_attachment` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `USER_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `URL_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `CONTENT_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TIME_` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of act_hi_attachment
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for act_hi_comment
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_comment`;
CREATE TABLE `act_hi_comment` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TIME_` datetime(3) NOT NULL,
  `USER_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `ACTION_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `MESSAGE_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `FULL_MSG_` longblob,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of act_hi_comment
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for act_hi_detail
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_detail`;
CREATE TABLE `act_hi_detail` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `ACT_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `VAR_TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `REV_` int(11) DEFAULT NULL,
  `TIME_` datetime(3) NOT NULL,
  `BYTEARRAY_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `DOUBLE_` double DEFAULT NULL,
  `LONG_` bigint(20) DEFAULT NULL,
  `TEXT_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TEXT2_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_HI_DETAIL_PROC_INST` (`PROC_INST_ID_`),
  KEY `ACT_IDX_HI_DETAIL_ACT_INST` (`ACT_INST_ID_`),
  KEY `ACT_IDX_HI_DETAIL_TIME` (`TIME_`),
  KEY `ACT_IDX_HI_DETAIL_NAME` (`NAME_`),
  KEY `ACT_IDX_HI_DETAIL_TASK_ID` (`TASK_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for act_hi_identitylink
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_identitylink`;
CREATE TABLE `act_hi_identitylink` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `GROUP_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `USER_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_HI_IDENT_LNK_USER` (`USER_ID_`),
  KEY `ACT_IDX_HI_IDENT_LNK_TASK` (`TASK_ID_`),
  KEY `ACT_IDX_HI_IDENT_LNK_PROCINST` (`PROC_INST_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for act_hi_taskinst
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_taskinst`;
CREATE TABLE `act_hi_taskinst` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TASK_DEF_KEY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PARENT_TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `OWNER_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `ASSIGNEE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `START_TIME_` datetime(3) NOT NULL,
  `CLAIM_TIME_` datetime(3) DEFAULT NULL,
  `END_TIME_` datetime(3) DEFAULT NULL,
  `DURATION_` bigint(20) DEFAULT NULL,
  `DELETE_REASON_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PRIORITY_` int(11) DEFAULT NULL,
  `DUE_DATE_` datetime(3) DEFAULT NULL,
  `FORM_KEY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_HI_TASK_INST_PROCINST` (`PROC_INST_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for act_hi_varinst
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_varinst`;
CREATE TABLE `act_hi_varinst` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `VAR_TYPE_` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `REV_` int(11) DEFAULT NULL,
  `BYTEARRAY_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `DOUBLE_` double DEFAULT NULL,
  `LONG_` bigint(20) DEFAULT NULL,
  `TEXT_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TEXT2_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` datetime(3) DEFAULT NULL,
  `LAST_UPDATED_TIME_` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_HI_PROCVAR_PROC_INST` (`PROC_INST_ID_`),
  KEY `ACT_IDX_HI_PROCVAR_NAME_TYPE` (`NAME_`,`VAR_TYPE_`),
  KEY `ACT_IDX_HI_PROCVAR_TASK_ID` (`TASK_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for act_id_group
-- ----------------------------
DROP TABLE IF EXISTS `act_id_group`;
CREATE TABLE `act_id_group` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of act_id_group
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for act_id_info
-- ----------------------------
DROP TABLE IF EXISTS `act_id_info`;
CREATE TABLE `act_id_info` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `USER_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `KEY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `VALUE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PASSWORD_` longblob,
  `PARENT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for act_id_membership
-- ----------------------------
DROP TABLE IF EXISTS `act_id_membership`;
CREATE TABLE `act_id_membership` (
  `USER_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `GROUP_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`USER_ID_`,`GROUP_ID_`),
  KEY `ACT_FK_MEMB_GROUP` (`GROUP_ID_`),
  CONSTRAINT `ACT_FK_MEMB_GROUP` FOREIGN KEY (`GROUP_ID_`) REFERENCES `act_id_group` (`ID_`),
  CONSTRAINT `ACT_FK_MEMB_USER` FOREIGN KEY (`USER_ID_`) REFERENCES `act_id_user` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for act_id_user
-- ----------------------------
DROP TABLE IF EXISTS `act_id_user`;
CREATE TABLE `act_id_user` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `FIRST_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `LAST_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `EMAIL_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PWD_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PICTURE_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for act_instance_record
-- ----------------------------
DROP TABLE IF EXISTS `act_instance_record`;
CREATE TABLE `act_instance_record` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '唯一编码 : 唯一编码',
  `model_id` varchar(128) DEFAULT NULL COMMENT '流程模型id : 流程模型id',
  `run_process_instance_id` varchar(128) DEFAULT NULL COMMENT '流程运行实例id : 流程运行实例id',
  `run_definition_id` varchar(128) DEFAULT NULL COMMENT '流程运行定义实例id : 流程运行定义实例id',
  `user_id` int(9) DEFAULT NULL COMMENT '流程启动人 : 流程启动人',
  `user_name` varchar(128) DEFAULT NULL COMMENT '流程启动人姓名 : 流程启动人姓名',
  `organ_id` int(9) DEFAULT NULL COMMENT '流程启动部门 : 流程启动部门',
  `organ_name` varchar(128) DEFAULT NULL COMMENT '流程启动部门名称 : 流程启动部门名称',
  `start_time` datetime DEFAULT NULL COMMENT '流程启动时间 : 流程启动时间',
  `end_time` datetime DEFAULT NULL COMMENT '流程结束时间 : 流程结束时间',
  `business_name` varbinary(128) DEFAULT NULL COMMENT '关联业务的流程名称 : 关联业务的流程名称',
  `is_suspended` int(1) DEFAULT '0' COMMENT '是否挂起 : 0未挂起 1已挂起',
  `is_finish` int(1) DEFAULT '0' COMMENT '是否结束 : 0未结束1已结束',
  `version` int(9) DEFAULT '1' COMMENT '版本 : 版本',
  `his_process_instance_id` varchar(128) DEFAULT NULL COMMENT '历史流程实例id : 历史流程实例id',
  `business_code` varchar(128) DEFAULT NULL COMMENT '关联业务代码 : 关联业务代码',
  `business_id` varchar(128) DEFAULT NULL COMMENT '关联业务id : 关联业务id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8 COMMENT='流程实例记录表';

-- ----------------------------
-- Table structure for act_node_action
-- ----------------------------
DROP TABLE IF EXISTS `act_node_action`;
CREATE TABLE `act_node_action` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '唯一编码 : 唯一编码',
  `action_code` varchar(128) DEFAULT NULL COMMENT '动作代码 : 动作代码',
  `node_code` varchar(128) DEFAULT NULL COMMENT '节点编码 : 节点编码',
  `flow_code` varchar(128) DEFAULT NULL COMMENT '流程编码 : 流程编码',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='节点动作对照表';


-- ----------------------------
-- Table structure for act_node_config
-- ----------------------------
DROP TABLE IF EXISTS `act_node_config`;
CREATE TABLE `act_node_config` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '唯一编码 : 唯一编码',
  `flow_code` varchar(128) DEFAULT NULL COMMENT '流程编码',
  `node_name` varchar(128) DEFAULT NULL COMMENT '流程节点名称 : 流程节点名称',
  `node_code` varchar(128) DEFAULT NULL COMMENT '流程节点code : 流程节点code',
  `order_code` varchar(128) DEFAULT NULL COMMENT '流程顺序流条件code : 流程顺序流条件code',
  `version` varchar(30) DEFAULT NULL COMMENT '版本号 : 版本号',
  `business_name` varchar(128) DEFAULT NULL COMMENT '业务名称 : 业务名称',
  `exception_code` varchar(128) DEFAULT NULL COMMENT '异常代码 : 异常代码',
  `trigger_type` int(4) DEFAULT '0' COMMENT '触发类型 : 0用户触发 1表单触发 2脚本触发 3周期触发 4异常触发',
  `local_node_id` int(9) DEFAULT NULL COMMENT '实地节点id : 实地节点id',
  `local_node_name` varchar(128) DEFAULT NULL COMMENT '实地节点名称 : 实地节点名称',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COMMENT='节点配置表';

-- ----------------------------
-- Table structure for act_node_record
-- ----------------------------
DROP TABLE IF EXISTS `act_node_record`;
CREATE TABLE `act_node_record` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '唯一编码 : 唯一编码',
  `instance_record_id` int(9) DEFAULT NULL COMMENT '流程实例记录表id : 流程实例记录表id',
  `model_id` varchar(128) DEFAULT NULL COMMENT '流程模型id : 流程模型id',
  `run_process_instance_id` varchar(128) DEFAULT NULL COMMENT '流程运行实例id : 流程运行实例id',
  `run_definition_id` varchar(128) DEFAULT NULL COMMENT '流程运行定义实例id : 流程运行定义实例id',
  `node_id` varchar(128) DEFAULT NULL COMMENT '关联流程节点id : 关联流程节点id',
  `node_name` varchar(128) DEFAULT NULL COMMENT '节点名称 : 节点名称',
  `examine_condition` varchar(128) DEFAULT NULL COMMENT '流程审核条件 : 流程审核条件',
  `start_time` datetime DEFAULT NULL COMMENT '流程节点开始时间 : 流程节点开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '流程节点结束时间 : 流程节点结束时间',
  `limit_time` int(16) DEFAULT NULL COMMENT '间隔时长 : 间隔时长',
  `his_process_instance_id` varchar(128) DEFAULT NULL COMMENT '历史流程实例id : 历史流程实例id',
  `application_id` varchar(128) DEFAULT NULL COMMENT '流程应用id（扩展） : 流程应用id（扩展）',
  `assignee_id` int(16) DEFAULT NULL COMMENT '流程节点审批人id : 流程节点审批人id',
  `assignee_name` varchar(128) DEFAULT NULL COMMENT '流程节点审批人名称 : 流程节点审批人名称',
  `assignee_content` varchar(512) DEFAULT NULL COMMENT '流程节点审批内容 : 流程节点审批内容',
  `organ_id` int(16) DEFAULT NULL COMMENT '流程节点审批部门 : 流程节点审批部门',
  `organ_name` varchar(128) DEFAULT NULL COMMENT '流程节点审批部门名称 : 流程节点审批部门名称',
  `approval_result` varchar(32) DEFAULT NULL COMMENT '流程节点审批结果 : 流程节点审批结果',
  `next_node_id` varchar(128) DEFAULT NULL COMMENT '流程下个节点id : 流程下个节点id',
  `task_id` int(32) DEFAULT NULL COMMENT '任务编码 : 任务编码',
  `business_id` varchar(128) DEFAULT NULL COMMENT '业务编码 : 业务编码',
  `business_name` varchar(128) DEFAULT NULL COMMENT '业务名称 : 业务名称',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=307 DEFAULT CHARSET=utf8 COMMENT='流程节点记录';

-- ----------------------------
-- Table structure for act_node_record_annex
-- ----------------------------
DROP TABLE IF EXISTS `act_node_record_annex`;
CREATE TABLE `act_node_record_annex` (
  `annex` int(9) NOT NULL COMMENT '附件编码',
  `record_id` int(9) NOT NULL COMMENT '记录编码 : 记录编码',
  PRIMARY KEY (`annex`,`record_id`),
  KEY `record_id` (`record_id`),
  CONSTRAINT `act_node_record_id` FOREIGN KEY (`record_id`) REFERENCES `act_node_record` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='流程节点记录附件表';

-- ----------------------------
-- Table structure for act_node_usergroup
-- ----------------------------
DROP TABLE IF EXISTS `act_node_usergroup`;
CREATE TABLE `act_node_usergroup` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '唯一编码 : 唯一编码',
  `flow_code` varchar(64) DEFAULT NULL COMMENT '流程编码 : 流程编码',
  `node_code` varchar(128) DEFAULT NULL COMMENT '节点编码 : 节点编码',
  `user_ids` varchar(128) DEFAULT NULL COMMENT '委托人 : 委托人',
  `task_user_code` varchar(64) DEFAULT NULL COMMENT '任务委托人编码 : 任务委托人编码（el表达式中的编码）',
  `org_ids` varchar(128) DEFAULT NULL COMMENT '委托组织机构 : 委托组织机构',
  `task_org_code` varchar(64) DEFAULT NULL COMMENT '任务委托机构编码 : 任务委托机构编码（el表达式中的编码）',
  `alternative_user_ids` varchar(128) DEFAULT NULL COMMENT '备选人 : 备选人',
  `task_alternative_user_code` varchar(64) DEFAULT NULL COMMENT '任务备选人编码 : 任务备选人编码（el表达式中的编码）',
  `alternative_org_ids` varchar(128) DEFAULT NULL COMMENT '备选组织机构 : 备选组织机构',
  `task_alternative_org_code` varchar(64) DEFAULT NULL COMMENT '任务备选机构编码（ : 任务备选机构编码（el表达式中的编码）',
  `org_flow_type` varchar(32) DEFAULT NULL COMMENT '组织机构流程编码 : 组织机构流程编码',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='流程任务用户对照表';

-- ----------------------------
-- Table structure for act_procdef_info
-- ----------------------------
DROP TABLE IF EXISTS `act_procdef_info`;
CREATE TABLE `act_procdef_info` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `INFO_JSON_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `ACT_UNIQ_INFO_PROCDEF` (`PROC_DEF_ID_`),
  KEY `ACT_IDX_INFO_PROCDEF` (`PROC_DEF_ID_`),
  KEY `ACT_FK_INFO_JSON_BA` (`INFO_JSON_ID_`),
  CONSTRAINT `ACT_FK_INFO_JSON_BA` FOREIGN KEY (`INFO_JSON_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_INFO_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for act_re_deployment
-- ----------------------------
DROP TABLE IF EXISTS `act_re_deployment`;
CREATE TABLE `act_re_deployment` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '',
  `DEPLOY_TIME_` timestamp(3) NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for act_re_model
-- ----------------------------
DROP TABLE IF EXISTS `act_re_model`;
CREATE TABLE `act_re_model` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `KEY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `LAST_UPDATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `VERSION_` int(11) DEFAULT NULL,
  `META_INFO_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `EDITOR_SOURCE_VALUE_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `EDITOR_SOURCE_EXTRA_VALUE_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_FK_MODEL_SOURCE` (`EDITOR_SOURCE_VALUE_ID_`),
  KEY `ACT_FK_MODEL_SOURCE_EXTRA` (`EDITOR_SOURCE_EXTRA_VALUE_ID_`),
  KEY `ACT_FK_MODEL_DEPLOYMENT` (`DEPLOYMENT_ID_`),
  CONSTRAINT `ACT_FK_MODEL_DEPLOYMENT` FOREIGN KEY (`DEPLOYMENT_ID_`) REFERENCES `act_re_deployment` (`ID_`),
  CONSTRAINT `ACT_FK_MODEL_SOURCE` FOREIGN KEY (`EDITOR_SOURCE_VALUE_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_MODEL_SOURCE_EXTRA` FOREIGN KEY (`EDITOR_SOURCE_EXTRA_VALUE_ID_`) REFERENCES `act_ge_bytearray` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for act_re_procdef
-- ----------------------------
DROP TABLE IF EXISTS `act_re_procdef`;
CREATE TABLE `act_re_procdef` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `KEY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `VERSION_` int(11) NOT NULL,
  `DEPLOYMENT_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `RESOURCE_NAME_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `DGRM_RESOURCE_NAME_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `HAS_START_FORM_KEY_` tinyint(4) DEFAULT NULL,
  `HAS_GRAPHICAL_NOTATION_` tinyint(4) DEFAULT NULL,
  `SUSPENSION_STATE_` int(11) DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `ACT_UNIQ_PROCDEF` (`KEY_`,`VERSION_`,`TENANT_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for act_ru_event_subscr
-- ----------------------------
DROP TABLE IF EXISTS `act_ru_event_subscr`;
CREATE TABLE `act_ru_event_subscr` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `EVENT_TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `EVENT_NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `ACTIVITY_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `CONFIGURATION_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `CREATED_` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_EVENT_SUBSCR_CONFIG_` (`CONFIGURATION_`),
  KEY `ACT_FK_EVENT_EXEC` (`EXECUTION_ID_`),
  CONSTRAINT `ACT_FK_EVENT_EXEC` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for act_ru_execution
-- ----------------------------
DROP TABLE IF EXISTS `act_ru_execution`;
CREATE TABLE `act_ru_execution` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `BUSINESS_KEY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PARENT_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `SUPER_EXEC_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `ACT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `IS_ACTIVE_` tinyint(4) DEFAULT NULL,
  `IS_CONCURRENT_` tinyint(4) DEFAULT NULL,
  `IS_SCOPE_` tinyint(4) DEFAULT NULL,
  `IS_EVENT_SCOPE_` tinyint(4) DEFAULT NULL,
  `SUSPENSION_STATE_` int(11) DEFAULT NULL,
  `CACHED_ENT_STATE_` int(11) DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '',
  `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `LOCK_TIME_` timestamp(3) NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_EXEC_BUSKEY` (`BUSINESS_KEY_`),
  KEY `ACT_FK_EXE_PROCINST` (`PROC_INST_ID_`),
  KEY `ACT_FK_EXE_PARENT` (`PARENT_ID_`),
  KEY `ACT_FK_EXE_SUPER` (`SUPER_EXEC_`),
  KEY `ACT_FK_EXE_PROCDEF` (`PROC_DEF_ID_`),
  CONSTRAINT `ACT_FK_EXE_PARENT` FOREIGN KEY (`PARENT_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_EXE_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`),
  CONSTRAINT `ACT_FK_EXE_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `ACT_FK_EXE_SUPER` FOREIGN KEY (`SUPER_EXEC_`) REFERENCES `act_ru_execution` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for act_ru_identitylink
-- ----------------------------
DROP TABLE IF EXISTS `act_ru_identitylink`;
CREATE TABLE `act_ru_identitylink` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `GROUP_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `USER_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_IDENT_LNK_USER` (`USER_ID_`),
  KEY `ACT_IDX_IDENT_LNK_GROUP` (`GROUP_ID_`),
  KEY `ACT_IDX_ATHRZ_PROCEDEF` (`PROC_DEF_ID_`),
  KEY `ACT_FK_TSKASS_TASK` (`TASK_ID_`),
  KEY `ACT_FK_IDL_PROCINST` (`PROC_INST_ID_`),
  CONSTRAINT `ACT_FK_ATHRZ_PROCEDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`),
  CONSTRAINT `ACT_FK_IDL_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_TSKASS_TASK` FOREIGN KEY (`TASK_ID_`) REFERENCES `act_ru_task` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for act_ru_job
-- ----------------------------
DROP TABLE IF EXISTS `act_ru_job`;
CREATE TABLE `act_ru_job` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `LOCK_EXP_TIME_` timestamp(3) NULL DEFAULT NULL,
  `LOCK_OWNER_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PROCESS_INSTANCE_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `RETRIES_` int(11) DEFAULT NULL,
  `EXCEPTION_STACK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `EXCEPTION_MSG_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  `REPEAT_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_CFG_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_FK_JOB_EXCEPTION` (`EXCEPTION_STACK_ID_`),
  CONSTRAINT `ACT_FK_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `act_ge_bytearray` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for act_ru_task
-- ----------------------------
DROP TABLE IF EXISTS `act_ru_task`;
CREATE TABLE `act_ru_task` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PARENT_TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TASK_DEF_KEY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `OWNER_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `ASSIGNEE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `DELEGATION_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PRIORITY_` int(11) DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `DUE_DATE_` datetime(3) DEFAULT NULL,
  `CATEGORY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `SUSPENSION_STATE_` int(11) DEFAULT NULL,
  `TENANT_ID_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '',
  `FORM_KEY_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_TASK_CREATE` (`CREATE_TIME_`),
  KEY `ACT_FK_TASK_EXE` (`EXECUTION_ID_`),
  KEY `ACT_FK_TASK_PROCINST` (`PROC_INST_ID_`),
  KEY `ACT_FK_TASK_PROCDEF` (`PROC_DEF_ID_`),
  CONSTRAINT `ACT_FK_TASK_EXE` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_TASK_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`),
  CONSTRAINT `ACT_FK_TASK_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `act_ru_execution` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for act_ru_variable
-- ----------------------------
DROP TABLE IF EXISTS `act_ru_variable`;
CREATE TABLE `act_ru_variable` (
  `ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `TYPE_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `NAME_` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `EXECUTION_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `BYTEARRAY_ID_` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `DOUBLE_` double DEFAULT NULL,
  `LONG_` bigint(20) DEFAULT NULL,
  `TEXT_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  `TEXT2_` varchar(4000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_VARIABLE_TASK_ID` (`TASK_ID_`),
  KEY `ACT_FK_VAR_EXE` (`EXECUTION_ID_`),
  KEY `ACT_FK_VAR_PROCINST` (`PROC_INST_ID_`),
  KEY `ACT_FK_VAR_BYTEARRAY` (`BYTEARRAY_ID_`),
  CONSTRAINT `ACT_FK_VAR_BYTEARRAY` FOREIGN KEY (`BYTEARRAY_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_VAR_EXE` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_VAR_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `act_ru_execution` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for sys_active_code
-- ----------------------------
DROP TABLE IF EXISTS `sys_active_code`;
CREATE TABLE `sys_active_code` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '唯一编码',
  `encryption` varchar(512) NOT NULL COMMENT '加密串',
  `startdate` datetime NOT NULL COMMENT '开始日期',
  `enddate` datetime NOT NULL COMMENT '结束日期',
  `ip_address` varchar(128) NOT NULL COMMENT 'ip地址',
  `mac_address` varchar(128) NOT NULL COMMENT 'mac地址',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  UNIQUE KEY `encryption` (`encryption`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COMMENT='版本记录';

-- ----------------------------
-- Records of sys_active_code
-- ----------------------------
BEGIN;
INSERT INTO `sys_active_code` VALUES (32, '04E7A41865839412715D58D565DF9A61D9822EA4AFD032EF14963C687EADE4BCEBA8A9C46D6B14F5000E53821D4968CEBCB54E9E74E8B130E5A5BBBA71D2AF7004A863475657358288F4944162AC9C3E', '2019-12-23 00:00:00', '2021-05-30 00:00:00', '172.21.0.14', '52-54-00-82-C0-19');
COMMIT;

-- ----------------------------
-- Table structure for sys_annex
-- ----------------------------
DROP TABLE IF EXISTS `sys_annex`;
CREATE TABLE `sys_annex` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '唯一编码',
  `name` varchar(128) NOT NULL COMMENT '附件名称',
  `type` varchar(128) DEFAULT '0' COMMENT '附件类型 : 0图片 1视频 2 文件',
  `path` varchar(128) DEFAULT NULL COMMENT '路径 : 文件存储路径',
  `table_id` int(9) DEFAULT NULL COMMENT '表中的唯一编码',
  `table_name` varchar(50) DEFAULT NULL COMMENT '上传的表名',
  `create_by` int(9) DEFAULT NULL COMMENT '创建人',
  `create_date` datetime DEFAULT NULL COMMENT '创建时间 : 创建时间',
  `update_by` int(9) DEFAULT NULL COMMENT '更新人 : 更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新人 : 更新人',
  `remarks` varchar(128) DEFAULT NULL COMMENT '备注',
  `version` int(9) DEFAULT '0' COMMENT '乐观锁版本管理',
  `organ_id` int(9) DEFAULT NULL COMMENT '创建部门Id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=89 DEFAULT CHARSET=utf8 COMMENT='系统附件';


-- ----------------------------
-- Table structure for sys_area
-- ----------------------------
DROP TABLE IF EXISTS `sys_area`;
CREATE TABLE `sys_area` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '唯一编码',
  `create_by` int(9) DEFAULT NULL COMMENT '创建人',
  `create_date` datetime DEFAULT NULL COMMENT '创建时间 : 创建时间',
  `update_by` int(9) DEFAULT NULL COMMENT '更新人 : 更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新人 : 更新人',
  `remarks` varchar(128) DEFAULT NULL COMMENT '备注',
  `del_flag` int(11) DEFAULT '0' COMMENT '删除标示 : 0未删除 1已删除',
  `version` int(9) DEFAULT '0' COMMENT '乐观锁版本管理',
  `parent_id` int(9) NOT NULL DEFAULT '0' COMMENT '父节点编码 : 父节点编码',
  `parent_name` varchar(128) DEFAULT NULL COMMENT '上级名称',
  `path` varchar(4000) NOT NULL COMMENT '当前路径',
  `sort` int(5) DEFAULT NULL COMMENT '排序',
  `name` varchar(128) NOT NULL COMMENT '地区名称',
  `code` varchar(128) DEFAULT NULL COMMENT '地区编码',
  `type` int(11) NOT NULL COMMENT '地区类型 : 区域类型（1：国家；2：省份、直辖市；3：地市；4：区县）',
  `organ_id` int(9) DEFAULT NULL COMMENT '创建部门Id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='系统区域';

-- ----------------------------
-- Records of sys_area
-- ----------------------------
BEGIN;
INSERT INTO `sys_area` VALUES (1, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, '0', NULL, '中国', NULL, 1, NULL);
INSERT INTO `sys_area` VALUES (2, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, '中国', '1|2', 1, '内蒙古自治区', NULL, 2, NULL);
INSERT INTO `sys_area` VALUES (3, NULL, NULL, NULL, NULL, NULL, 0, 0, 2, '内蒙古自治区', '1|2|3', 1, '呼和浩特', NULL, 3, NULL);
COMMIT;

-- ----------------------------
-- Table structure for sys_dict
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict`;
CREATE TABLE `sys_dict` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '唯一编码',
  `create_by` int(9) DEFAULT NULL COMMENT '创建人',
  `create_date` datetime DEFAULT NULL COMMENT '创建时间 : 创建时间',
  `update_by` int(9) DEFAULT NULL COMMENT '更新人 : 更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新人 : 更新人',
  `remarks` varchar(128) DEFAULT NULL COMMENT '备注',
  `del_flag` int(11) DEFAULT '0' COMMENT '删除标示 : 0未删除 1已删除',
  `version` int(9) DEFAULT '0' COMMENT '乐观锁版本管理',
  `dictkey` varchar(128) NOT NULL COMMENT '键值',
  `dictvalue` varchar(128) NOT NULL COMMENT '值',
  `type` varchar(128) DEFAULT NULL COMMENT '数据字典类型',
  `typeinfo` varchar(128) DEFAULT NULL COMMENT '数据字典类型描述',
  `title` varchar(512) DEFAULT NULL COMMENT '描述',
  `parent_id` int(9) NOT NULL COMMENT '父节点编码 : 父节点编码',
  `parent_name` varchar(128) DEFAULT NULL COMMENT '上级名称',
  `path` varchar(4000) DEFAULT NULL COMMENT '当前路径',
  `sort` int(5) DEFAULT NULL COMMENT '排序',
  `organ_id` int(9) DEFAULT NULL COMMENT '创建部门Id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COMMENT='数字字典表';

-- ----------------------------
-- Records of sys_dict
-- ----------------------------
BEGIN;
INSERT INTO `sys_dict` VALUES (21, 1, '2020-01-27 11:33:31', 1, '2020-01-27 11:33:36', 'dataPermission', 0, 0, 'dataPermission', '数据权限', 'dataPermission', '数据权限', NULL, 0, NULL, '21|', 4, NULL);
INSERT INTO `sys_dict` VALUES (22, 1, '2020-01-27 11:36:52', 1, '2020-01-27 11:37:05', 'data_permission', 0, 0, '0', '仅能自己能看', 'data_permission', '数据权限', '数据权限', 21, '数据权限', '21|22|', 1, NULL);
INSERT INTO `sys_dict` VALUES (23, 1, '2020-01-27 11:39:56', 1, '2020-01-27 11:39:59', 'data_permission', 0, 0, '1', '当前部门数据', 'data_permission', '数据权限', '数据权限', 21, '数据权限', '21|23|', 2, NULL);
INSERT INTO `sys_dict` VALUES (24, 1, '2020-01-27 11:41:28', 1, '2020-01-27 11:41:30', 'data_permission', 0, 0, '2', '当前网点/分行数据', 'data_permission', '数据权限', '数据权限', 21, '数据权限', '21|24|', 3, NULL);
INSERT INTO `sys_dict` VALUES (25, 1, '2020-01-27 11:42:50', 1, '2020-01-27 11:42:52', 'data_permission', 0, 0, '3', '当前联社数据', 'data_permission', '数据权限', '数据权限', 21, '数据权限', '21|25|', 4, NULL);
INSERT INTO `sys_dict` VALUES (26, 1, '2020-01-27 11:44:53', 1, '2020-01-27 11:44:59', 'data_permission', 0, 0, '4', '全部数据', 'data_permission', '数据权限', '数据权限', 21, '数据权限', '21|26|', 5, NULL);
COMMIT;

-- ----------------------------
-- Table structure for sys_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_log`;
CREATE TABLE `sys_log` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '唯一编码',
  `create_by` int(9) DEFAULT NULL COMMENT '创建人',
  `create_date` datetime DEFAULT NULL COMMENT '创建时间 : 创建时间',
  `update_by` int(9) DEFAULT NULL COMMENT '更新人 : 更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新人 : 更新人',
  `remarks` varchar(128) DEFAULT NULL COMMENT '备注',
  `del_flag` int(11) DEFAULT '0' COMMENT '删除标示 : 0未删除 1已删除',
  `version` int(9) DEFAULT '0' COMMENT '乐观锁版本管理',
  `type` int(2) DEFAULT NULL COMMENT '日志类型',
  `title` varchar(128) DEFAULT NULL COMMENT '标题',
  `content` varchar(128) DEFAULT NULL COMMENT '内容',
  `organ_id` int(9) DEFAULT NULL COMMENT '创建部门Id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=343 DEFAULT CHARSET=utf8 COMMENT='系统日志';

-- ----------------------------
-- Table structure for sys_organ_post
-- ----------------------------
DROP TABLE IF EXISTS `sys_organ_post`;
CREATE TABLE `sys_organ_post` (
  `organ_id` int(9) NOT NULL COMMENT '组织机构编码',
  `post_id` int(9) NOT NULL COMMENT '岗位编码',
  PRIMARY KEY (`organ_id`,`post_id`),
  KEY `post_id` (`post_id`),
  CONSTRAINT `sys_organ_post_ibfk_1` FOREIGN KEY (`organ_id`) REFERENCES `sys_organization` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `sys_organ_post_ibfk_2` FOREIGN KEY (`post_id`) REFERENCES `sys_post` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='组织机构岗位';

-- ----------------------------
-- Records of sys_organ_post
-- ----------------------------
BEGIN;
INSERT INTO `sys_organ_post` VALUES (1, 1);
COMMIT;

-- ----------------------------
-- Table structure for sys_organ_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_organ_user`;
CREATE TABLE `sys_organ_user` (
  `org_id` int(9) NOT NULL COMMENT '机构编码',
  `user_id` int(9) NOT NULL COMMENT '用户编码',
  `post_id` int(9) DEFAULT NULL COMMENT '岗位编码',
  PRIMARY KEY (`org_id`,`user_id`),
  KEY `user_id` (`user_id`),
  CONSTRAINT `sys_organ_user_ibfk_1` FOREIGN KEY (`org_id`) REFERENCES `sys_organization` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `sys_organ_user_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `sys_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='组织机构用户表';

-- ----------------------------
-- Records of sys_organ_user
-- ----------------------------
BEGIN;
INSERT INTO `sys_organ_user` VALUES (1, 1, NULL);
COMMIT;

-- ----------------------------
-- Table structure for sys_organization
-- ----------------------------
DROP TABLE IF EXISTS `sys_organization`;
CREATE TABLE `sys_organization` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '唯一编码',
  `area_id` int(9) DEFAULT NULL COMMENT '所属区域编码',
  `create_by` int(9) DEFAULT NULL COMMENT '创建人',
  `create_date` datetime DEFAULT NULL COMMENT '创建时间 : 创建时间',
  `update_by` int(9) DEFAULT NULL COMMENT '更新人 : 更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新人 : 更新人',
  `remarks` varchar(128) DEFAULT NULL COMMENT '备注',
  `del_flag` int(11) DEFAULT '0' COMMENT '删除标示 : 0未删除 1已删除',
  `version` int(9) DEFAULT '0' COMMENT '乐观锁版本管理',
  `parent_id` int(9) NOT NULL COMMENT '父节点编码 : 父节点编码',
  `parent_name` varchar(128) DEFAULT NULL COMMENT '上级名称',
  `path` varchar(4000) DEFAULT NULL COMMENT '当前路径',
  `sort` int(5) DEFAULT NULL COMMENT '排序',
  `name` varchar(128) DEFAULT NULL COMMENT '机构名称',
  `code` varchar(128) DEFAULT NULL COMMENT '机构编码',
  `type` int(1) DEFAULT NULL COMMENT '机构类型 : （1：联社 2：支行 3：部门）',
  `address` varchar(128) DEFAULT NULL COMMENT '联系地址',
  `zip_code` varchar(12) DEFAULT NULL COMMENT '邮政编码',
  `master` varchar(128) DEFAULT NULL COMMENT '负责人',
  `phone` varchar(20) DEFAULT NULL COMMENT '负责人电话号码',
  `fax` varchar(128) DEFAULT NULL COMMENT '传真',
  `email` varchar(128) DEFAULT NULL COMMENT '邮箱',
  `flow_type` varchar(32) DEFAULT NULL COMMENT '流程类型',
  `organ_id` int(9) DEFAULT NULL COMMENT '创建部门Id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`),
  KEY `area_id` (`area_id`),
  CONSTRAINT `sys_organization_ibfk_1` FOREIGN KEY (`area_id`) REFERENCES `sys_area` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COMMENT='系统机构';

-- ----------------------------
-- Records of sys_organization
-- ----------------------------
BEGIN;
INSERT INTO `sys_organization` VALUES (1, 3, NULL, NULL, 1, '2020-02-23 17:41:55', NULL, 0, 0, 0, NULL, '1|', 1, '内蒙古', '100100100', 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for sys_permission
-- ----------------------------
DROP TABLE IF EXISTS `sys_permission`;
CREATE TABLE `sys_permission` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '唯一编码',
  `create_by` int(9) DEFAULT NULL COMMENT '创建人',
  `create_date` datetime DEFAULT NULL COMMENT '创建时间 : 创建时间',
  `update_by` int(9) DEFAULT NULL COMMENT '更新人 : 更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新人 : 更新人',
  `remarks` varchar(128) DEFAULT NULL COMMENT '备注',
  `del_flag` int(11) DEFAULT '0' COMMENT '删除标示 : 0未删除 1已删除',
  `version` int(9) DEFAULT '0' COMMENT '乐观锁版本管理',
  `parent_id` int(9) NOT NULL COMMENT '父节点编码 : 父节点编码',
  `parent_name` varchar(128) DEFAULT NULL COMMENT '上级名称',
  `path` varchar(4000) DEFAULT NULL COMMENT '当前路径',
  `sort` int(5) DEFAULT NULL COMMENT '排序',
  `name` varchar(128) DEFAULT NULL COMMENT '名称',
  `href` varchar(128) DEFAULT NULL COMMENT '链接',
  `target` varchar(32) DEFAULT NULL COMMENT '目标 : 目标（mainFrame、 _blank、_self、_parent、_top）',
  `icon` varchar(128) DEFAULT NULL COMMENT '图标',
  `is_show` int(11) DEFAULT NULL COMMENT '是否在菜单中显示（1：显示；0：不显示） : 是否在菜单中显示（1：显示；0：不显示）',
  `permission` varchar(128) DEFAULT NULL COMMENT '权限标示',
  `button_per` int(1) DEFAULT '0' COMMENT '是否为按钮权限0不是 1是',
  `router_name` varchar(128) DEFAULT NULL COMMENT '路由名称',
  `router_component` varchar(255) DEFAULT NULL COMMENT '路由组件',
  `router_redirect` varchar(128) DEFAULT NULL COMMENT '跳转路径',
  `is_catch` int(1) DEFAULT '0' COMMENT '是否缓存0不缓存1缓存',
  `is_breadcrumbs` int(1) DEFAULT '0' COMMENT '是否为面包屑0不是1是',
  `organ_id` int(9) DEFAULT NULL COMMENT '创建部门Id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8 COMMENT='系统菜单';

-- ----------------------------
-- Records of sys_permission
-- ----------------------------
BEGIN;
INSERT INTO `sys_permission` VALUES (1, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, '1|', 12, '', '', NULL, NULL, 1, 'system', 0, '系统管理', 'system', NULL, 0, 0, NULL);
INSERT INTO `sys_permission` VALUES (2, NULL, NULL, 1, '2020-01-31 09:26:27', 'yh', 0, 0, 1, '系统管理', '1|2|', 1, '', '', NULL, NULL, 1, 'selectPage', 0, '用户管理', 'user', 'system/user/list', 0, 0, NULL);
INSERT INTO `sys_permission` VALUES (3, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, '系统管理', '1|3|', 2, '', '', NULL, NULL, 1, 'list', 0, '机构管理', 'organ', 'system/organ/list', 0, 0, NULL);
INSERT INTO `sys_permission` VALUES (4, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, '系统管理', '1|4|', 3, '', '', NULL, NULL, 1, 'selectPage', 0, '角色管理', 'role', 'system/role/list', 0, 0, NULL);
INSERT INTO `sys_permission` VALUES (5, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, '系统管理', '1|5|', 4, '', '', NULL, NULL, 1, 'systemPermission', 0, '权限管理', 'permission', 'system/permission/list', 0, 0, NULL);
INSERT INTO `sys_permission` VALUES (6, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, '系统管理', '1|6|', 5, '', '', NULL, NULL, 1, 'systemLog', 0, '日志管理', 'log', 'system/log/list', 0, 0, NULL);
INSERT INTO `sys_permission` VALUES (7, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, '系统管理', '1|7|', 6, '', '', NULL, NULL, 1, 'systemSet', 0, '系统设置', 'set', 'system/set/list', 0, 0, NULL);
INSERT INTO `sys_permission` VALUES (8, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, '系统管理', '1|8|', 7, '', '', NULL, NULL, 0, 'systemActive', 0, '系统过期激活', 'active', 'system/overdue', 0, 0, NULL);
INSERT INTO `sys_permission` VALUES (9, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, '系统管理', '1|9|', 8, '', '', NULL, NULL, 1, 'flowModel', 0, '流程管理', 'flowModel', 'system/flow/model', 0, 0, NULL);
INSERT INTO `sys_permission` VALUES (10, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, '系统管理', '1|10|', 9, '', '', NULL, NULL, 1, 'flowNode', 0, '流程节点管理', 'flowNode', 'system/flow/nodeConfigList', 0, 0, NULL);
INSERT INTO `sys_permission` VALUES (11, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, '系统管理', '1|11|', 10, NULL, NULL, NULL, NULL, 1, 'findByParentId', 0, '数据字典', 'dict', 'system/dict/list', 0, 0, NULL);
COMMIT;

-- ----------------------------
-- Table structure for sys_post
-- ----------------------------
DROP TABLE IF EXISTS `sys_post`;
CREATE TABLE `sys_post` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '唯一编码',
  `name` varchar(128) DEFAULT NULL COMMENT '岗位名称',
  `create_by` int(9) DEFAULT NULL COMMENT '创建人',
  `create_date` datetime DEFAULT NULL COMMENT '创建时间 : 创建时间',
  `update_by` int(9) DEFAULT NULL COMMENT '更新人 : 更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新人 : 更新人',
  `remarks` varchar(128) DEFAULT NULL COMMENT '备注',
  `del_flag` int(11) DEFAULT '0' COMMENT '删除标示 : 0未删除 1已删除',
  `version` int(9) DEFAULT '0' COMMENT '乐观锁版本管理',
  `organ_id` int(9) DEFAULT NULL COMMENT '创建部门Id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='岗位信息';

-- ----------------------------
-- Records of sys_post
-- ----------------------------
BEGIN;
INSERT INTO `sys_post` VALUES (1, '超级管理员', NULL, NULL, NULL, NULL, NULL, 0, 0, NULL);
COMMIT;

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '唯一编码',
  `create_by` int(9) DEFAULT NULL COMMENT '创建人',
  `create_date` datetime DEFAULT NULL COMMENT '创建时间 : 创建时间',
  `update_by` int(9) DEFAULT NULL COMMENT '更新人 : 更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新人 : 更新人',
  `remarks` varchar(128) DEFAULT NULL COMMENT '备注',
  `del_flag` int(11) DEFAULT '0' COMMENT '删除标示 : 0未删除 1已删除',
  `version` int(9) DEFAULT '0' COMMENT '乐观锁版本管理',
  `name` varchar(128) DEFAULT NULL COMMENT '角色名称',
  `enname` varchar(128) DEFAULT NULL COMMENT '英文名称',
  `role_type` int(1) DEFAULT NULL COMMENT '角色类型 : 1 Web角色 2 App角色 3 小程序角色',
  `data_scope` int(2) DEFAULT NULL COMMENT '数据范围 : 数据范围（0仅自己能看1当前部门2当前网店/分行3当前联社4所有部门）',
  `is_sys` int(1) DEFAULT NULL COMMENT '是否为系统内 : 0系统内用户1系统外用户',
  `organ_id` int(9) DEFAULT NULL COMMENT '创建部门Id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COMMENT='系统角色';

-- ----------------------------
-- Records of sys_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` VALUES (1, NULL, NULL, 1, '2020-02-09 22:30:45', '备注', 0, 0, '超级管理员', NULL, 1, 4, 0, NULL);
COMMIT;

-- ----------------------------
-- Table structure for sys_role_organization
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_organization`;
CREATE TABLE `sys_role_organization` (
  `role_id` int(9) NOT NULL COMMENT '角色编码',
  `org_id` int(9) NOT NULL COMMENT '机构编码',
  PRIMARY KEY (`role_id`,`org_id`),
  KEY `org_id` (`org_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色机构表';

-- ----------------------------
-- Records of sys_role_organization
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_organization` VALUES (1, 1);
COMMIT;

-- ----------------------------
-- Table structure for sys_role_permission
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_permission`;
CREATE TABLE `sys_role_permission` (
  `role_id` int(9) NOT NULL COMMENT '角色编码',
  `per_id` int(9) NOT NULL COMMENT '权限编码',
  `button_per` varchar(128) DEFAULT NULL COMMENT '选中的按钮权限',
  PRIMARY KEY (`role_id`,`per_id`),
  KEY `per_id` (`per_id`),
  CONSTRAINT `sys_role_permission_ibfk_1` FOREIGN KEY (`per_id`) REFERENCES `sys_permission` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `sys_role_permission_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色权限对照表';

-- ----------------------------
-- Records of sys_role_permission
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_permission` VALUES (1, 1, NULL);
INSERT INTO `sys_role_permission` VALUES (1, 2, NULL);
INSERT INTO `sys_role_permission` VALUES (1, 3, NULL);
INSERT INTO `sys_role_permission` VALUES (1, 4, NULL);
INSERT INTO `sys_role_permission` VALUES (1, 5, NULL);
INSERT INTO `sys_role_permission` VALUES (1, 6, NULL);
INSERT INTO `sys_role_permission` VALUES (1, 7, NULL);
INSERT INTO `sys_role_permission` VALUES (1, 8, NULL);
INSERT INTO `sys_role_permission` VALUES (1, 9, NULL);
INSERT INTO `sys_role_permission` VALUES (1, 10, NULL);
INSERT INTO `sys_role_permission` VALUES (1, 11, NULL);
COMMIT;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `id` int(9) NOT NULL AUTO_INCREMENT COMMENT '唯一编码',
  `create_by` int(9) DEFAULT NULL COMMENT '创建人',
  `create_date` datetime DEFAULT NULL COMMENT '创建时间 : 创建时间',
  `update_by` int(9) DEFAULT NULL COMMENT '更新人 : 更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新人 : 更新人',
  `remarks` varchar(128) DEFAULT NULL COMMENT '备注',
  `del_flag` int(11) DEFAULT '0' COMMENT '删除标示 : 0未删除 1已删除',
  `version` int(9) DEFAULT '0' COMMENT '乐观锁版本管理',
  `login_name` varchar(32) DEFAULT NULL COMMENT '登录用户名',
  `password` varchar(32) DEFAULT NULL COMMENT '密码',
  `work_no` varchar(128) DEFAULT NULL COMMENT '工号',
  `name` varchar(128) DEFAULT NULL COMMENT '真实姓名',
  `email` varchar(32) DEFAULT NULL COMMENT '邮箱',
  `phone` varchar(32) DEFAULT NULL COMMENT '联系电话',
  `user_type` int(2) DEFAULT NULL COMMENT '用户类型 : 0系统内用户1系统外用户',
  `login_ip` varchar(32) DEFAULT NULL COMMENT '最后登陆IP',
  `login_date` datetime DEFAULT NULL COMMENT '最后登陆时间',
  `login_flag` int(2) DEFAULT NULL COMMENT '当前是否在线 : 0不在线 1在线',
  `sex` int(1) DEFAULT NULL COMMENT '性别 : 0男 1女',
  `icon` int(9) DEFAULT '0' COMMENT '用户图标',
  `is_admin` int(1) DEFAULT '0' COMMENT '是否为管理员0不是1是',
  `organ_id` int(9) DEFAULT NULL COMMENT '创建部门Id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8 COMMENT='系统用户表';

-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` VALUES (1, NULL, NULL, 1, '2020-08-21 23:19:56', '123456', 0, 0, 'admin', 'RaFutWeh0ww=', '01', '管理员', 'admin@126.com', '15011111111', 1, '110.19.175.5', '2020-08-21 23:19:56', 1, 1, 0, 1, NULL);
COMMIT;

-- ----------------------------
-- Table structure for sys_user_permission
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_permission`;
CREATE TABLE `sys_user_permission` (
  `user_id` int(9) NOT NULL COMMENT '用户编码 : 用户编码',
  `per_id` int(9) NOT NULL COMMENT '权限编码 : 权限编码',
  `button_per` varchar(128) DEFAULT NULL COMMENT '按钮权限 : 按钮权限',
  `data_scope` int(2) DEFAULT NULL COMMENT '数据范围',
  `data_method` varchar(128) DEFAULT NULL COMMENT '数据方法',
  PRIMARY KEY (`user_id`,`per_id`),
  KEY `per_id` (`per_id`),
  CONSTRAINT `sys_user_permission_ibfk_1` FOREIGN KEY (`per_id`) REFERENCES `sys_permission` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `sys_user_permission_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `sys_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统用户权限';

-- ----------------------------
-- Records of sys_user_permission
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_permission` VALUES (1, 1, NULL, 4, 'system');
INSERT INTO `sys_user_permission` VALUES (1, 2, NULL, 4, 'selectPage');
INSERT INTO `sys_user_permission` VALUES (1, 3, NULL, 4, 'list');
INSERT INTO `sys_user_permission` VALUES (1, 4, NULL, 4, 'selectPage');
INSERT INTO `sys_user_permission` VALUES (1, 5, NULL, 4, 'systemPermission');
INSERT INTO `sys_user_permission` VALUES (1, 6, NULL, 4, 'systemLog');
INSERT INTO `sys_user_permission` VALUES (1, 7, NULL, 4, 'systemSet');
INSERT INTO `sys_user_permission` VALUES (1, 9, NULL, 4, 'flowModel');
INSERT INTO `sys_user_permission` VALUES (1, 10, NULL, 4, 'flowNode');
COMMIT;

-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role` (
  `user_id` int(9) NOT NULL COMMENT '用户编码',
  `role_id` int(9) NOT NULL COMMENT '角色编码',
  PRIMARY KEY (`user_id`,`role_id`),
  KEY `role_id` (`role_id`),
  CONSTRAINT `sys_user_role_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `sys_user_role_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `sys_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户角色表';

-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_role` VALUES (1, 1);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
